@(elements: helper.FieldElements)

<div class="form-group @if(elements.hasErrors) {has-error}">
  <label for="@elements.id" class="col-sm-2 control-label">@elements.label</label>
  <div class="@elements.args.toMap.get('inputDivClass).getOrElse("col-sm-10")">
    @if(elements.input.toString().contains("class=")) {
      @Html(elements.input.toString().replaceFirst("(class=[\"'])",	"$1form-control "))
    } else {
      @Html(elements.input.toString().replaceFirst("(<\\w+ )","$1class=\"form-control\" "))
    }
    <span class="help-block text-muted">@elements.infos.mkString(",")</span>
    @if(elements.hasErrors) {
      <span class="help-block">@elements.errors.mkString(", ")</span>
	  }
	</div>
</div>
